<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  
    
    <title>当前项目下的表信息</title>
   	<style type="text/css">
   		#mainTitle{
   			background-color: #6699FF;
   			font-size: 32px;
   		}
   		ul{
   			list-style-type: none;
   			padding-left: 0px;
   		}
   		
   		
   		a{
   			font-size: 12px;
   		}
   		
   		#tableDiv{
   			float: left;
   			border: 1px solid #cccccc;
   			margin-top: 10px;
   			padding: 10px;
   		}
   		
   		#detailDiv{
   			border: 2px solid #CCCCFF;
   			float: left;
   			margin-top: 40px;
   			margin-left: 10px;
   		}
   		
   	</style>
   	<script type="text/javascript">
   		function showHeaders(str){
   		
   			var arr = str.split(",");
   			if(arr.length > 1){
   				var detailDiv = document.getElementById("detailDiv");
   				while(true){
   					if(detailDiv.hasChildNodes()){
   						detailDiv.removeChild(detailDiv.firstChild);
   					}else{
   						break;
   					}
   					
   				}
   				for(var i = 0; i < arr.length - 1; i++){
   					var txt = document.createTextNode(arr[i]);
   					detailDiv.appendChild(txt);
   					detailDiv.appendChild(document.createElement("br"));
   				}	
   				detailDiv.style.padding = "10px";
   			}
   			
   		}
   	</script>
   	
  </head>
  
  <body>
   	<div id="mainTitle">&nbsp; 
   		当前项目名称： ${projectName } 
   	</div>
   	<div>
   		该项目下的数据表如下：<br>
   			<a href="delProject.action?projectName=${projectName }">删除该项目</a>
   		<div id="tableDiv">
   		
   		<ul>
   		<s:iterator value="tableDetails" id="td">
   			<li>
   				<a href="listData.action?sheetName=${td.key }&projectName=${projectName}"" onmouseover="showHeaders('${td.value }' )">${td.key } </a>&nbsp;&nbsp;<a href="delTable.action?projectName=${projectName }&sheetName=${td.key }">删除</a> 
   			</li>
   		</s:iterator>
   		</ul>
   		</div>
   		<div id="detailDiv">
   		</div>
   		<div style="clear: left;">
   			<a href="CreateTable.jsp?projectName=${projectName }">创建新数据表</a>
   		</div>
   	</div>
  </body>
</html>
